package com.xxx.system.mapper;


import com.xxx.system.domain.Role;
import com.xxx.system.query.RoleQuery;

import java.util.List;

public interface RoleMapper {
//    //新增
//    void addRole(Role role);
//    //修改
//    void updateRole(Role role);
    //删除
    void deteleById(Long id);
    //查询单个
    Role findOne(Long id);
    //查询所有
    List<Role> findAll();

    List<Role> queryPage(RoleQuery roleQuery);

    void deleteRoleByIds(Long[] ids);

    List<Long> findAllMenusByRoleId(Role role);

    List<Long> findAllPermsByRoleId(Role role);

    void add(Role role);

    void update(Role role);

    void insForRelatinMenu(Role role);

    void delForRelatinMenu(Role role);

    void insForRelatinPermission(Role role);

    void delForRelatinPermission(Role role);

    void handleForMenuByEmpId(Long id);

    void handleForPermissionByEmpId(Long id);

    void deleteRoleByIdsForMenu(Long[] ids);

    void deleteRoleByIdsForPermission(Long[] ids);

    List<Role> findMenuIdsByRoleIds(List<Long> roleIds);

    List<Role> findPerIdsByRoleIds(List<Long> roleIds);
}
